/**
 * Copyright 2007-2008. Chongqing First Information & Network Co., Ltd. All
 * rights reserved. <a>http://www.cqfirst.com.cn</a>
 */
package com.cqcis.uip.base.framework.utils;

/**
 * XML文件处理工具类
 * 
 * @author huangmy
 * @date   2007-11-23
 */
public class XmlFileTrimUtil {
	/**
	 * 无换行符
	 */
	private static String xmlEncode = "encoding=\"UTF-8\"?> ";
	/**
	 * 带换行符的编码标识
	 */
	private static String xmlEncodeBr = "encoding=\"UTF-8\"?>\n";
	
    /**
     * 修正XML文件, 限制为UTF-8
     * 
     * @param xmlFile
     * @return
     */
    public static String trim(String xmlFile) {    	
    	return xmlFile.trim().replace(xmlEncodeBr, xmlEncode);
    }
}
